import logging as log


def get_oplog_to_backup(mongodb_connect):
    if mongodb_connect.is_mongos is True:
        shard_list = list(mongodb_connect.config.shards.find())
        # print(shard_list)
        shard_list_to_return = [x.get('host').split('/')[1] for x in shard_list]
        return shard_list_to_return
    else:
        return []
